import java.util.Scanner;
/*
 * 
 * @author kulwinder kaur
 * Jan 20, 2013
 * */
 

public class ClassifyTriangle {

	
	public static void main(String[] args) {
		Scanner input= new Scanner(System.in);
	
	
		  int x,y,z;
		  int A,B,C;
		 
		  System.out.print("Enter the side x of triangle:");
		  x=input.nextInt();
		  System.out.print("Enter the side y of triangle:");
		  y=input.nextInt();
		  System.out.print("Enter the side z of triangle:");
		  z=input.nextInt();
		  	  
		//check triangle properties
		  if (((x+y)>z) && ((y+z)>x) && ((x+z)>y))
		  {
			  
			  if((x==y) && (y==z))
			  {
				  System.out.println("The triangle is equilateral");
			  } 
			  else if((x==z) || (y==z) || (x==y))
			  {
				  System.out.println("The triangle is isoseles");
			  }
			  else
			  {
				  System.out.println("The triangle is scalene");
			  }
		  
			
		  System.out.print("Enter the angle A of triangle:");
		  A=input.nextInt();
		  System.out.print("Enter the angle B of triangle:");
		  B=input.nextInt();
		  System.out.print("Enter the angle C of triangle:");		  
		  C=input.nextInt();
		
		  //check angle sum property
		  if ((A+B+C)==180)
		  {
		  
			  if((A==90) || (B==90) || (C==90))
			  {
			  System.out.println("The triangle is right angled triangle");
			  } 
			  else 
				  System.out.println("The triangle is not right angled triangle");
		   }
	
		//If angle sum property not obeyed, print this statement
		  else 
			System.out.println("The triangle is not valid") ;

		  }
	  else 
		{
			System.out.println("The triangle is not valid");
		}
		  
	}
		  
}
